from django.contrib.auth.models import AbstractUser
from django.db import models


class UserProfile(AbstractUser):
    """
    自定义用户表
    """
    POST_CHOICE = (
        (1, "测试工程师"),
        (2, "开发工程师"),
        (3, "产品经理"),
        (4, "项目经理"),
    )
    username = models.CharField(max_length=30, unique=True, verbose_name="用户名")
    post = models.IntegerField(verbose_name="岗位", choices=POST_CHOICE)

    class Meta:
        verbose_name = "用户信息"
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.username
